package net.hn.hnms.biz.safety.water.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.hn.hnms.biz.safety.water.service.StatisticsIndexService;
import net.hn.hnms.sys.common.core.domain.R;
import net.hn.hnms.sys.common.satoken.config.AutoSetMineCode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @ClassName: StatisticsIndexController
 * @Description 安全综合概览-重点测定统计信息
 * @Author 王龙
 * @Date 2022-09-24
 * @Version 0.1
 */
@RestController
@RequestMapping("statistics")
@Api(value = "重点测定统计信息", tags = {"重点测定统计信息"})
public class StatisticsIndexController {
    @Resource
    private StatisticsIndexService statisticsIndexService;
    @ApiOperation("水仓排水涌水监测-涌水量")
    @GetMapping("waterInflow")
    @AutoSetMineCode
    public R waterInflow(@ApiParam(value = "煤矿编码") String mineCode) {
        BigDecimal water = statisticsIndexService.waterInflow(mineCode);
        return R.ok(water);
    }
    @ApiOperation("水仓排水涌水监测-排水量")
    @GetMapping("waterDischarge")
    @AutoSetMineCode
    public R waterDischarge(@ApiParam(value = "煤矿编码") String mineCode) {
        BigDecimal water = statisticsIndexService.waterDischarge(mineCode);
        return R.ok(water);
    }
    @ApiOperation("长观孔总数")
    @GetMapping("count")
    @AutoSetMineCode
    public R count(@ApiParam(value = "煤矿编码") String mineCode) {
        Integer water = statisticsIndexService.count(mineCode);
        return R.ok(water);
    }
    @ApiOperation("长观孔报警总数")
    @GetMapping("policeCount")
    @AutoSetMineCode
    public R policeCount(@ApiParam(value = "煤矿编码") String mineCode) {
        Integer water = statisticsIndexService.policeCount(mineCode);
        return R.ok(water);
    }

}
